<?php 
require_once '../kelas/amankanParam.php';
require_once '../kelas/record.php';
require_once '../kelas/fungsi.php';
require_once '../kelas/useradmin.php';
echo $objFungsi->buatJudul('Ganti Password');
 ?>
 <form name="frmChPassAdmin" method="post" action="<?php echo BASEURL.'proses/administrasi.php?on=chpass' ?>">
 	<table>
 		<tr>
 			<td class="font_isi_judul">Password Lama</td>
 		</tr>
 		<tr>
 			<td><input required="required" class="text_box_2" name="oldpass" type="password"></td>
 		</tr>
 		<tr>
 			<td class="font_isi_judul">Password Baru</td>
 		</tr>
 		<tr>
 			<td><input  required="required" class="text_box_2" name="newpass" type="password"></td>
 		</tr>
 		<tr>
 			<td class="font_isi_judul">Ulangi Password</td>
 		</tr>
 		<tr>
 			<td><input class="text_box_2"  required="required" name="repass" type="password"></td>
 		</tr>
 		<tr>
 			<td><input type="submit" style="width:100px" value="Ganti Password" class="button_2"><input class="button_2" type="reset" value="Reset"></td>
 		</tr>
 	</table>
 </form>
 <script type="text/javascript">
 $(document).ready(function(){
 	var frmChPassAdmin = $(document).find('form[name="frmChPassAdmin"]');
 		frmChPassAdmin.submit(function(e){
 			var newP = frmChPassAdmin.find('input[name="newpass"]').val();
 			var reP = frmChPassAdmin.find('input[name="repass"]').val();
 			if(newP==reP){
 				return true;
 			}
 				else{
 					alert('Ulangi Password Salah');
 					e.preventDefault();
 				}
 		})
 });
 </script>